<?php
/**
 * Application level Controller
 *
 * This file is application-wide controller file. You can put all
 * application-wide controller-related methods here.
 *
 * PHP versions 4 and 5
 *
 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
 * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
 *
 * Licensed under The MIT License
 * Redistributions of files must retain the above copyright notice.
 *
 * @copyright     Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
 * @link          http://cakephp.org CakePHP(tm) Project
 * @package       cake
 * @subpackage    cake.app
 * @since         CakePHP(tm) v 0.2.9
 * @license       MIT License (http://www.opensource.org/licenses/mit-license.php)
 */

/**
 * Application Controller
 *
 * Add your application-wide methods in the class below, your controllers
 * will inherit them.
 *
 * @package       cake
 * @subpackage    cake.app
 */
class AppController extends Controller {
	// se definen los componentes a usar en toda la app.
	
	  var $components = array(
                 'Email'=>array( 'delivery'=>'smtp', 'smtpOptions' => array(
		 'port'=>'465',
		 'timeout'=>'30',
		 'host' => 'ssl://smtp.gmail.com',
		 'username'=>'institutodeidiomas@unillanos.edu.co',
		 'password'=>'centroidiomas',
		) ),
		'Session'
		);
	
	
	/*
	var $components = array(
			'Auth'=>array(
				'userModel' => 'Ciuuser',
				'loginError' => "Usuario/Clave equivocada",
				'loginAction' => array(
	                'controller' => 'ciuusers',
	                'action' => 'login',
	                'plugin' => false,
	               'admin' => false,
	                )
	            )
                , 'Session');
				*/
	
	/*
	var $components = array(
			'Auth'=>array(
				'userModel' => 'Ciuuser',
				'loginError' => "Usuario/Clave equivocada",
				'loginAction' => array(
	                'controller' => 'ciuusers',
	                'action' => 'login',
	                'plugin' => false,
	               'admin' => false,
	                )
	            )
                , 'Session');
				
				
	public function beforeFilter() {
		parent::beforeFilter();
		$this->Auth->allow('register');	
	}			
	*/
    //public function beforeFilter() {
    	/*
        if ($this->Session->check('Config.language')) {
            Configure::write('Config.language', $this->Session->read('Config.language'));
        }
        */
        //Configure::write('Config.language','spa');
        //setlocale(LC_ALL, 'sp', 'sp');
        //CakeSession::write('Config.language', 'spa' );
        //setlocale("LC_ALL", "sp_SP.utf8");
    //}
}
